package io.renren.modules.substation.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.substation.dao.TSampDevDataInfoDao;
import io.renren.modules.substation.entity.TSampDevDataInfoEntity;
import io.renren.modules.substation.service.TSampDevDataInfoService;


@Service("tSampDevDataInfoService")
public class TSampDevDataInfoServiceImpl extends ServiceImpl<TSampDevDataInfoDao, TSampDevDataInfoEntity> implements TSampDevDataInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TSampDevDataInfoEntity> page = this.page(
                new Query<TSampDevDataInfoEntity>().getPage(params),
                new QueryWrapper<TSampDevDataInfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public int updateByDevId(TSampDevDataInfoEntity tSampDevDataInfoEntity){

        return baseMapper.updateByDevId(tSampDevDataInfoEntity);
    }

}